package com.gary.springcloud.controller;

import com.gary.springcloud.entity.CommonResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import javax.annotation.Resource;

/**
 * @author pengrui
 * @date 2021/1/7 - 14:30
 */
@RestController
public class OrderController {

    /**
     *  注意 要写 http://
     */
    public static final String INVOKE_URI = "http://cloud-provider-service";

    @Resource
    private RestTemplate restTemplate;

    @GetMapping("/consumer/zk")
    public String getInfo() {
        return restTemplate.getForObject(INVOKE_URI+"/payment/zk", String.class);
    }
}
